

%% load data

% Input data
VarDecomp = csvread('source/VarDecompWUW.csv');

% Weighted data
col = 1 ; 

    % without residual
    MeanU_data    = VarDecomp(1,col) ;
    StdU_data     = VarDecomp(2,col) ;
    SdUc_data     = VarDecomp(3,col) ;
    VarUpred_data = VarDecomp(4,col) ;

    VarSep_data   = 100 * VarDecomp(5,col) ;
    VarFind_data  = 100 * VarDecomp(6,col) ;
    Cov_data      = 100 * VarDecomp(7,col) ;

    sep_data_nores   = VarSep_data + Cov_data / 2 ;
    find_data_nores  = VarFind_data + Cov_data / 2 ;

    % with residual
    ratio_data = VarUpred_data / SdUc_data^2 ;
    sep_data   = ratio_data * ( VarSep_data + Cov_data / 2 )  ;
    find_data  = ratio_data * ( VarFind_data + Cov_data / 2 ) ;
    res_data   = 100 - sep_data - find_data ;

    
% Unweighted data
col = 2 ;

    % without residual
    MeanU0_data    = VarDecomp(1,col) ;
    StdU0_data     = VarDecomp(2,col) ;
    SdU0c_data     = VarDecomp(3,col) ;
    VarU0pred_data = VarDecomp(4,col) ;
    VarSep0_data   = 100 * VarDecomp(5,col) ;
    VarFind0_data  = 100 * VarDecomp(6,col) ;
    Cov0_data      = 100 * VarDecomp(7,col) ;

    sep0_data_nores   = VarSep0_data  + Cov0_data / 2 ;
    find0_data_nores  = VarFind0_data + Cov0_data / 2 ;
    
    % with residual
    ratio0_data = VarUpred_data / SdUc_data^2 ;
    sep0_data   = ratio_data * ( VarSep_data + Cov_data / 2 )  ;
    find0_data  = ratio_data * ( VarFind_data + Cov_data / 2 ) ;
    res0_data   = 100 - sep_data - find_data ;

